-
Notifications
You must be signed in to change notification settings - Fork 121
Application password experiment: Fall back to Jetpack proxy after app password generation fails #16079
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
RafaelKayumov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the TC3 I got:
{
"error": "application_passwords_disabled",
"message": "Application passwords are not available."
}
Requests fell back to the JP proxy.
For the TC6 I got:
{
"error": "general_error",
"message": "Application passwords is not working."
}
The above error was returned couple times after every order lost loading attempt. I did 2 or 3 order list reloading by triggering pull-to-refresh. Then it crashed on the 3rd attempt:
Could be a race condition with a parallel retriedJetpackRequests object removing in separate threads. I'm able to reproduce by pull-to-refreshing dashboard and order list in parallel. Repro rate ~15%. Hard to reproduce.
Generated by 🚫 Danger |
|
Great catch @RafaelKayumov! It's a noob error to update those array/dictionary for error handling in different threads. I moved all error handling to a separate file and use sync access to avoid race condition. I also added tests to confirm thread safety. Let me know if you have any other suggestions! |
RafaelKayumov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx!
![]()

Closes WOOMOB-16079
Description
This PR updates error handling for application password generation by catching the failure to fall back to Jetpack proxy requests. Changes include:
RequestProcessorDelegateto remove the reason in the delegate method.RequestsProcessorto only notify failure of application password generation upon catching errors directly related to application password.AlamofireNetworkto catchAFError.requestAdaptationFailedand enable retrying requests when this error occurs.Testing steps
Follow the instructions in TC3 and TC6 of the test plan pe5sF9-4Am-p2.
Testing information
Tested the following test cases with simulator iPhone 16 iOS 18.2.
Screenshots
No UI changes.
RELEASE-NOTES.txtif necessary.